home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 28 / develop issue 28 code / merge tools / macundifference.make < prev    next >
Encoding:
Text File  |  1996-09-25  |  7.9 KB  |  272 lines

  1. #
  2. #    MacUndifference.make
  3. #
  4. # Macintosh MPW Makefile for the Eclectus Undifference utility
  5. # Copyright (C) 1992-96 Eclectus (D. John Anderson, Alan B. Harper).
  6.  
  7. # This file is part of the Eclectus integration utilities.
  8.  
  9. # Eclectus integration utilities are free software; you can redistribute
  10. # it and/or modify it under the terms of the GNU General Public License
  11. # as published by the Free Software Foundation; either version 1, or
  12. # (at your option) any later version.
  13.  
  14. # Eclectus integration utilities are distributed in the hope that they
  15. # will be useful, but WITHOUT ANY WARRANTY; without even the implied
  16. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the GNU General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU General Public License
  20. # along with the Eclectus integration utilities; see the file COPYING.
  21. # If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
  22. # MA 02139, USA.
  23.  
  24. # This make file has the following targets
  25. #
  26. #        Clean:                        Remove all derived files, create directories necessary for other targets below.
  27. #
  28. #        All/<no target>:    Undifference and UndifferenceDebug as fat tools*
  29. #        Release:                    Fat Undifference
  30. #        PPC:                            PPC only Undifference
  31. #        68K:                            68K only Undifference
  32. #        Debug                            Fat UndifferenceDebug*
  33. #        DebugPPC:                    PPC only UndifferenceDebug*
  34. #        Debug68K:                    68K only UndifferenceDebug*
  35. #
  36. #        Install:                    Install fat Undifference and UndifferenceDebug*
  37. #        InstallRelease:        Install fat Undifference*
  38. #        InstallPPC:                Install PPC Undifference*
  39. #        Install68K:                Install 68K Undifference*
  40. #        InstallDebug:            Install fat UndifferenceDebug*
  41. #        InstallDebugPPC:    Install PPC only UndifferenceDebug*
  42. #        InstallDebug68K:    Install 68K only UndifferenceDebug*
  43. #
  44. #    *    The code for UndifferenceDebug is not included in the standard distribution, since it is used
  45. #        only to test the code. Write Alan Harper (aharper@dnai.com) if you have a need for this code.
  46. #        Also, the Install... targets place the tools in {MPW}ECTools, which may not be where you
  47. #        want them. Change BIN_DIR to adjust this.
  48.  
  49. MWCPPC_OPTIONS = ∂
  50.     -d DF_MACHINE_MACINTOSH ∂
  51.     -d DF_COMPILER_MW ∂
  52.     -d DF_CHIP_PPC ∂
  53.     -mapcr ∂
  54.     -maxerrors 10 ∂
  55.     -once ∂
  56.     -opt all ∂
  57.     -proto strict ∂
  58.     -r ∂
  59.     -str readonly ∂
  60.     -trigraphs on ∂
  61.     -w full
  62.  
  63.  
  64. MWC68K_OPTIONS = ∂
  65.     -d DF_MACHINE_MACINTOSH ∂
  66.     -d DF_COMPILER_MW ∂
  67.     -d DF_CHIP_68K ∂
  68.     -enum int ∂
  69.     -mapcr ∂
  70.     -maxerrors 10 ∂
  71.     -mbg off ∂
  72.     -mc68020 ∂
  73.     -model codesmart ∂
  74.     -once ∂
  75.     -opt all ∂
  76.     -proto strict ∂
  77.     -r ∂
  78.     -str pool ∂
  79.     -sym off ∂
  80.     -trigraphs on ∂
  81.     -w full
  82.  
  83. ADDL_MWCPPC_OPTIONS = 
  84.  
  85. ADDL_MWC68K_OPTIONS = 
  86.  
  87. MWLINKPPC_OPTIONS = ∂
  88.     -d ∂
  89.     -c 'MPS ' ∂
  90.     -t 'MPST'
  91.  
  92. MWLINK68K_OPTIONS = -mpwtool
  93.  
  94. MWLINKPPC_LIBS = ∂
  95.     "{MWPPCLibraries}"MWMPWCRuntime.Lib ∂
  96.     "{MWPPCLibraries}"'MPW ANSI.C.PPC.Lib' ∂
  97.     "{MWPPCLibraries}"PPCToolLibs.o ∂
  98.     "{SharedLibraries}"InterfaceLib ∂
  99.     "{SharedLibraries}"MathLib 
  100.  
  101. MWLINK68K_LIBS = ∂
  102.     "{MW68KLibraries}"MPWRuntime.68K.lib ∂
  103.     "{MW68KLibraries}"'MPW ANSI (4i/8d) C.68K.Lib' ∂
  104.     "{MW68KLibraries}"'MathLib68K (4i/8d).Lib' ∂
  105.     "{MW68KLibraries}"ToolLibs.o ∂
  106.     "{MW68KLibraries}"MacOS.Lib ∂
  107.  
  108. DERIVED_DIR = :UndifferenceR.i
  109.  
  110. DERIVED_DEBUG_DIR = :UndifferenceD.i
  111.  
  112. TOOL_NAME = Undifference
  113.  
  114. DEBUG_TOOL_NAME = UndifferenceDebug
  115.  
  116. INSTALL_AS_NAME = Undifference
  117.  
  118. INSTALL_FROM_NAME = Undifference
  119.  
  120. BIN_DIR = {MPW}ECTools
  121.  
  122. LOCAL_BIN_DIR = :MacTools
  123.  
  124. UNDIFFERENCE_TO_OBERISH_DIR = ::Oberish
  125.  
  126. H_FILES = ∂
  127.     diff.h
  128.  
  129. UNDIFFERENCE_PPC_OBJS = ∂
  130.     {DERIVED_DIR}:io.c.x ∂
  131.     {DERIVED_DIR}:util.c.x ∂
  132.     {DERIVED_DIR}:Undifference.c.x ∂
  133.     {DEBUG_PPC_OBJS}
  134.  
  135. UNDIFFERENCE_68K_OBJS = ∂
  136.     {DERIVED_DIR}:io.c.o ∂
  137.     {DERIVED_DIR}:util.c.o ∂
  138.     {DERIVED_DIR}:Undifference.c.o ∂
  139.     {DEBUG_68K_OBJS}
  140.  
  141. DEBUG_PPC_OBJS =
  142.  
  143. DEBUG_68K_OBJS =
  144.  
  145. Release ƒ Undifference
  146.  
  147. All ƒ Release Debug
  148.  
  149. PPC ƒ Undifference.PPC
  150.  
  151. 68K ƒ Undifference.68K
  152.  
  153. Debug ƒ UndifferenceDebug
  154.  
  155. DebugPPC ƒ UndifferenceDebug.PPC
  156.  
  157. Debug68K ƒ UndifferenceDebug.68K
  158.  
  159. Undifference ƒ {DERIVED_DIR}:Undifference
  160.  
  161. Undifference.PPC ƒ {DERIVED_DIR}:Undifference.PPC
  162.  
  163. Undifference.68K ƒ {DERIVED_DIR}:Undifference.68K
  164.  
  165. UndifferenceDebug ƒ 
  166.     Make -f MacUndifference.make ∂
  167.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  168.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  169.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  170.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  171.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  172.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  173.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}
  174.  
  175. UndifferenceDebug.PPC ƒ
  176.     Make -f MacUndifference.make ∂
  177.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  178.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  179.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  180.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  181.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.PPC
  182.  
  183. UndifferenceDebug.68K ƒ
  184.     Make -f MacUndifference.make ∂
  185.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  186.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  187.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  188.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  189.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.68K
  190.  
  191. {UNDIFFERENCE_PPC_OBJS} ƒ {H_FILES}
  192.  
  193. {UNDIFFERENCE_68K_OBJS} ƒ {H_FILES}
  194.  
  195. {DERIVED_DIR}: ƒ :
  196.  
  197. {DERIVED_DIR}: ƒ {UNDIFFERENCE_TO_OBERISH_DIR}:
  198.  
  199. {DERIVED_DIR}:{TOOL_NAME} ƒ {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}.68K
  200.     Duplicate -y {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}
  201.     Rez -append -o {DERIVED_DIR}:{TOOL_NAME} -d RSRCNAME="∂"{DERIVED_DIR}:{TOOL_NAME}.68K∂"" MacCopyRSRC.r
  202.  
  203. {DERIVED_DIR}:{TOOL_NAME}.PPC ƒ  {UNDIFFERENCE_PPC_OBJS}
  204.     MWLinkPPC {MWLINKPPC_LIBS} {UNDIFFERENCE_PPC_OBJS} {MWLINKPPC_OPTIONS} -o {Targ}
  205.     Rez -d APPNAME=∂"{TOOL_NAME}∂" MacGenericCFRG.r -o {Targ}
  206.  
  207. {DERIVED_DIR}:{TOOL_NAME}.68K ƒ  {UNDIFFERENCE_68K_OBJS}
  208.     MWLink68K {MWLINK68K_LIBS} {UNDIFFERENCE_68K_OBJS} {MWLINK68K_OPTIONS} -o {Targ}
  209.  
  210. Install ƒ InstallRelease InstallDebug
  211.  
  212. InstallRelease ƒ {DERIVED_DIR}:{INSTALL_FROM_NAME}
  213.     If not `Exists {BIN_DIR}:`
  214.         NewFolder {BIN_DIR}:
  215.     End
  216.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {BIN_DIR}:{INSTALL_AS_NAME}
  217.     If not `Exists {LOCAL_BIN_DIR}:`
  218.         NewFolder {LOCAL_BIN_DIR}:
  219.     End
  220.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {LOCAL_BIN_DIR}:{INSTALL_AS_NAME}.mpw
  221.  
  222. InstallPPC ƒ
  223.     Make -f MacUndifference.make InstallRelease ∂
  224.         -d INSTALL_FROM_NAME="Undifference.PPC" ∂
  225.         -d TOOL_NAME="Undifference"
  226.  
  227. Install68K ƒ
  228.     Make -f MacUndifference.make InstallRelease ∂
  229.         -d INSTALL_FROM_NAME="Undifference.68K" ∂
  230.         -d TOOL_NAME="Undifference"
  231.  
  232. InstallDebug ƒ
  233.     Make -f MacUndifference.make InstallRelease ∂
  234.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  235.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  236.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  237.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  238.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  239.         -d INSTALL_FROM_NAME="UndifferenceDebug" ∂
  240.         -d INSTALL_AS_NAME="UndifferenceDebug" ∂
  241.         -d TOOL_NAME="UndifferenceDebug"
  242.  
  243. InstallDebugPPC ƒ
  244.     Make -f MacUndifference.make InstallRelease ∂
  245.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  246.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  247.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  248.         -d INSTALL_FROM_NAME="UndifferenceDebug.PPC" ∂
  249.         -d INSTALL_AS_NAME="UndifferenceDebug" ∂
  250.         -d TOOL_NAME="UndifferenceDebug"
  251.  
  252. InstallDebug68K ƒ
  253.     Make -f MacUndifference.make InstallRelease ∂
  254.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {UNDIFFERENCE_TO_OBERISH_DIR}" ∂
  255.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  256.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  257.         -d INSTALL_FROM_NAME="UndifferenceDebug.68K" ∂
  258.         -d INSTALL_AS_NAME="UndifferenceDebug" ∂
  259.         -d TOOL_NAME="UndifferenceDebug"
  260.  
  261. Clean ƒ
  262.     Delete -y -i {DERIVED_DIR}
  263.     NewFolder {DERIVED_DIR}
  264.     Delete -y -i {DERIVED_DEBUG_DIR}
  265.     NewFolder {DERIVED_DEBUG_DIR}
  266.  
  267. .c.x ƒ .c
  268.     MWCPPC {MWCPPC_OPTIONS} {ADDL_MWCPPC_OPTIONS} {DepDir}{Default}.c -o {Targ}
  269.  
  270. .c.o ƒ .c
  271.     MWC68K {MWC68K_OPTIONS} {ADDL_MWC68K_OPTIONS} {DepDir}{Default}.c -o {Targ}
  272.